package com.zeny.express.framework.shared.serializer;

import com.zeny.express.framework.shared.domain.Constants;

public class StringSerializer implements Serializer<String> {

	public String deserialize(byte[] bytes) {
		return (bytes == null ? null : new String(bytes, Constants.DEFAULT_CHARSET));
	}

	public byte[] serialize(String string) {
		return (string == null ? null : string.getBytes(Constants.DEFAULT_CHARSET));
	}
}
